<?php

namespace App\Http\Controllers;

use App\Http\Logic\User;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class UserController extends Controller
{
    /**
     * 获取用户列表
     * @param Request $request
     * @return JsonResponse
     */
    public function list(Request $request): JsonResponse
    {
        $params['size'] = $request->input('size', 10);
        $params['page'] = $request->input('page', 1);

        $data = User::getInstance()->search($params);

        return $this->retSuccess($data);
    }
}
